package com.tarena.demo.luban.all.main.rpc;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.tarena.demo.luban.protocol.cart.param.CartDeleteParam;
import org.springframework.stereotype.Component;

/**
 * 方式二
 */
@Component
public class DeleteCartRpc {

    //@SentinelResource(value = "delete-cart",blockHandler = "deleteHandler")
    public Boolean deleteCart(CartDeleteParam cartDeleteParam){
        // 删除购物车逻辑
        return true;
    }

    public Boolean deleteHandler(CartDeleteParam cartDeleteParam, BlockException e){
        // 删除购物车逻辑
        return true;
    }

}
